package com.example.shoppingmall.service;

import com.example.shoppingmall.pojo.Trademark;
import com.example.shoppingmall.dao.TrademarkMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TrademarkService {
    @Autowired
    private TrademarkMapper trademarkMapper;

    public List<Trademark> trademarkList(@Param("name")String name,
                                         @Param("updateTime")String updateTime,
                                         @Param("no")int no){
        return trademarkMapper.trademarkList(name,updateTime,no);
    }

    public int count(@Param("name")String name,
                     @Param("updateTime")String updateTime){
        return trademarkMapper.count(name,updateTime);
    }

    public int add(Trademark trademark){
        return trademarkMapper.add(trademark);
    }

    public int delete(@Param("id")int id){
        return trademarkMapper.delete(id);
    }

    public int chackName(@Param("name")String name){
        return trademarkMapper.chackName(name);
    }

    public Trademark xiangQing(@Param("id")int id){
        return trademarkMapper.xiangQing(id);
    }

    public int update(Trademark trademark){
        return trademarkMapper.update(trademark);
    }

    public List<Trademark>list(){
        return trademarkMapper.list();
    }

}
